LanguageExt.Core

LanguageExt.Core Utility

Contents

class CollectionFormat Source #

Fields

field int MaxShortItems = 50 Source #

Application wide setting for the maximum number of items shown in a call to the ToString method of any LanguageExt collection type.

class EnumerableOptimal Source #

Methods

method IEnumerable<A> ConcatFast <A> (this IEnumerable<A> ma, IEnumerable<A> mb) Source #

method EnumerableM<A> ConcatFast <A> (this EnumerableM<A> ma, IEnumerable<A> mb) Source #

class IL Source #

Methods

method Func<R> Ctor <R> () Source #

Emits the IL to instantiate a type of R with a single argument to the constructor

method Func<A, R> Ctor <A, R> () Source #

Emits the IL to instantiate a type of R with a single argument to the constructor

method Func<A, B, R> Ctor <A, B, R> () Source #

Emits the IL to instantiate a type of R with two arguments to the constructor

method Func<A, B, C, R> Ctor <A, B, C, R> () Source #

Emits the IL to instantiate a type of R with three arguments to the constructor

method Func<A, B, C, D, R> Ctor <A, B, C, D, R> () Source #

Emits the IL to instantiate a type of R with four arguments to the constructor

method Option<Func<object, R>> Func1 <TYPE, R> (Type arg1, Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method

method Option<Func<A, R>> Func1 <TYPE, A, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with one argument

method Option<Func<A, B, R>> Func2 <TYPE, A, B, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with two arguments

method Option<Func<A, B, C, R>> Func3 <TYPE, A, B, C, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with three arguments

method Option<Func<A, B, C, D, R>> Func4 <TYPE, A, B, C, D, R> (Func<MethodInfo, bool>? methodPred = null) Source #

Emits the IL to invoke a static method with four arguments

method Func<A, int> GetHashCode <A> (bool includeBase) Source #

Builds a function to provide a hash-code for a record type. the hash-code is built from the hash-codes of all the fields that make up the type.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, object, bool> Equals <A> (bool includeBase) Source #

Provides a function that compares two record type arguments (one of type A and one of object) for structural equality, this first makes sure that the Object argument is of type A and then compares the fields from each argument for equality and returns true if all are equal.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, A, bool> EqualsTyped <A> (bool includeBase) Source #

Provides a function that compares two record type arguments for structural equality, this first compares the fields from each argument for equality and returns true if all are equal.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, A, int> Compare <A> (bool includeBase) Source #

Provides a function that compares two record type arguments for structural equality, this compares the fields from each argument for equality and returns 0 if all are equal, -1 if X is less than Y, and 1 if X is greater than Y.

You should cache the result of this method to reduce the work of building the IL each time. Better still use the RecordType<A> type to provide a cached version of these results.

method Func<A, string> ToString <A> (bool includeBase) Source #

method Action<A, SerializationInfo> GetObjectData <A> (bool includeBase) Source #

method Action<A, SerializationInfo> SetObjectData <A> (bool includeBase) Source #

method Func<A, B>? GetPropertyOrField <A, B> (string name) Source #

method Func<A, B>? GetProperty <A, B> (string name) Source #

method Func<A, B>? GetField <A, B> (string name) Source #

class ILCapability Source #

Fields

field bool Available Source #

class SysInfo Source #

System information helper

Properties

property int ProcessorCount Source #

Cached number of processors in the machine

property int DefaultAsyncSequenceParallelism Source #

When working with an IEnumerable of Tasks or Seq of Tasks, this setting is used as the default number of task items streamed at any one time. This reduces pressure on the system when working with large lazy streams of tasks.

Each method that uses it has an override that allows for per-usage settings.

The default value is max(1, Environment.ProcessorCount / 2)

record TrampolineF <A> Source #

Two argument trampoline

Methods

method TrampolineF<A> Continue () Source #

method TrampolineF<A> Complete (A result) Source #

record TrampolineContinueF <A> Source #

Two argument trampoline continue

record TrampolineCompleteF <A> (A Result) Source #

Two argument trampoline complete

record TrampolineF <A, B> Source #

Two argument trampoline

Methods

method TrampolineF<A, B> Continue (A arg1) Source #

method TrampolineF<A, B> Complete (B result) Source #

record TrampolineContinueF <A, B> (A Arg1) Source #

Two argument trampoline continue

record TrampolineCompleteF <A, B> (B Result) Source #

Two argument trampoline complete

record TrampolineF <A, B, C> Source #

Two argument trampoline

Methods

method TrampolineF<A, B, C> Continue (A arg1, B arg2) Source #

method TrampolineF<A, B, C> Complete (C result) Source #

record TrampolineContinueF <A, B, C> (A Arg1, B Arg2) Source #

Two argument trampoline continue

record TrampolineCompleteF <A, B, C> (C Result) Source #

Two argument trampoline complete

record TrampolineF <A, B, C, D> Source #

Two argument trampoline

Methods

method TrampolineF<A, B, C, D> Continue (A arg1, B arg2, C arg3) Source #

method TrampolineF<A, B, C, D> Complete (D result) Source #

record TrampolineContinueF <A, B, C, D> (A Arg1, B Arg2, C Arg3) Source #

Two argument trampoline continue

record TrampolineCompleteF <A, B, C, D> (D Result) Source #

Two argument trampoline complete

class Trampoline Source #

Methods

method TrampolineF<A> Continue <A> () Source #

method TrampolineF<A, B> Continue <A, B> (A arg1) Source #

method TrampolineF<A, B, C> Continue <A, B, C> (A arg1, B arg2) Source #

method TrampolineF<A, B, C, D> Continue <A, B, C, D> (A arg1, B arg2, C arg3) Source #

method TrampolineF<A> Complete <A> (A result) Source #

method TrampolineF<A, B> Complete <A, B> (B result) Source #

method TrampolineF<A, B, C> Complete <A, B, C> (C result) Source #

method TrampolineF<A, B, C, D> Complete <A, B, C, D> (D result) Source #

method A Start <A> (Func<TrampolineF<A>> f) Source #

method ValueTask<A> StartAsync <A> (Func<ValueTask<TrampolineF<A>>> f) Source #

method B Start <A, B> (Func<A, TrampolineF<A, B>> f, A arg1) Source #

method ValueTask<B> StartAsync <A, B> (Func<A, ValueTask<TrampolineF<A, B>>> f, A arg1) Source #

method C Start <A, B, C> (Func<A, B, TrampolineF<A, B, C>> f, A arg1, B arg2) Source #

method ValueTask<C> StartAsync <A, B, C> (Func<A, B, ValueTask<TrampolineF<A, B, C>>> f, A arg1, B arg2) Source #

method D Start <A, B, C, D> (Func<A, B, C, TrampolineF<A, B, C, D>> f, A arg1, B arg2, C arg3) Source #

method ValueTask<D> StartAsync <A, B, C, D> ( Func<A, B, C, ValueTask<TrampolineF<A, B, C, D>>> f, A arg1, B arg2, C arg3) Source #

class WaitAsync Source #

Methods

method ValueTask<(A A, B B)> WaitAll <A, B> (ValueTask<A> va, ValueTask<B> vb) Source #

method ValueTask<(A A, B B, C C)> WaitAll <A, B, C> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc) Source #

method ValueTask<(A A, B B, C C, D D)> WaitAll <A, B, C, D> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc, ValueTask<D> vd) Source #

method ValueTask<(A A, B B, C C, D D, E E)> WaitAll <A, B, C, D, E> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc, ValueTask<D> vd, ValueTask<E> ve) Source #

method ValueTask<(A A, B B, C C, D D, E E, F F)> WaitAll <A, B, C, D, E, F> (ValueTask<A> va, ValueTask<B> vb, ValueTask<C> vc, ValueTask<D> vd, ValueTask<E> ve, ValueTask<F> vf) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, int millisecondsTimeout, CancellationToken cancellationToken) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, TimeSpan timeout, CancellationToken cancellationToken) Source #

method Task<bool> WaitOneAsync (this WaitHandle handle, CancellationToken cancellationToken) Source #